package com.hitqz.robot.driver.util;

import cn.hutool.core.util.StrUtil;
import com.hitqz.robot.driver.communication.SerialPortServer;
import com.hitqz.robot.driver.communication.TcpClient;

public class M518Toolkit {
    public static String m518ComName = "";

    public static String m518OpenDoorText = "";

    public static String m518CloseDoorText = "";

    public static SerialPortServer m518SerialPortServer = null;

    //开门
    public static boolean openDoor(){
        if (m518SerialPortServer == null || StrUtil.isBlank(m518OpenDoorText)) {
            return false;
        }
        m518SerialPortServer.sendHexStr(m518OpenDoorText);
        //todo 等待回复报文
        return true;
    }

    // 关门
    public static boolean closeDoor(){
        if (m518SerialPortServer == null || StrUtil.isBlank(m518CloseDoorText)) {
            return false;
        }
        m518SerialPortServer.sendHexStr(m518CloseDoorText);
        //todo 等待回复报文
        return true;
    }


}
